<?php namespace App\Repositories\Item;

interface CompanyRepositoryInterface
{
    /**
     * 获取公司
     *
     * @param $id
     *
     * @return \Illuminate\Database\Eloquent\Collection|\App\Models\Company|\App\Models\Company[]
     */
    public function show($id);

    /**
     * 新增公司
     *
     * @param $creator_uid
     * @param $name
     *
     * @return Company
     */
    public function store($creator_uid, $name);

    /**
     * 修改公司信息
     *
     * @param $id
     * @param $name
     * @param $creator_uid
     *
     * @return Company|Company[]|\Illuminate\Database\Eloquent\Collection
     */
    public function update($id, $name, $creator_uid);

    /**
     * 获取用户公司
     *
     * @param     $creator_uid
     * @param int $per_page
     *
     * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
     */
    public function lists($creator_uid, $per_page = 10);

    /**
     * 判断用户是否拥有该公司
     *
     * @param $user_id
     * @param $company_id
     *
     * @return bool
     */
    public function checkUserHasCompany($user_id, $company_id);
}
